Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


PreviousPrevious NextNext

~Paul Bubresazenflar 23.Jan.04 04:56 PM a Web browser
Applications Development All Releases All Platforms

I'm trying to use the GetDocumentByKey method with a string array, but it always returns Nothing. All the columns in the view are sorted. Here's the code: PLZ HELP!

Dim Session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim doc As NotesDocument
Dim item As NotesItem
Dim var As String
Dim key As String
Dim ctr As Integer

Set db = session.CurrentDatabase
Set View = db.GetView("MYVIEW")

Set qry.Connection = con
Set result.Query = qry
If con.ConnectTo("ODBCsource", "USER", "pass") Then
Messagebox "Connection to the OBDC Data Source Failed!" ,0,"Error"
Exit Sub
End If

key = ""
For i = 1 To result.NumColumns
var = result.GetValue(i)
key = key & var

Set doc = view.GetDocumentByKey(key)

If doc Is Nothing Then
*** At this point debug shows the next line is processed, meaning the getdocumentbykey method returned Nothing, when the document does exist!!

Am I defining the key wrong?!?

GetDocumentByKey with Key String Ar... (~Paul Bubresaze... 23.Jan.04)
. . RE: GetDocumentByKey with Key Strin... (~Bill Frokimari... 23.Jan.04)
. . Key must be an array (~Richard Zenger... 23.Jan.04)
. . . . RE: Key must be an array (~Paul Bubresaze... 24.Jan.04)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS